package com.disgnpattern.learn.chapter1;


/**
 * @author dxy
 * @version 1.0
 * @date 2021/10/21 10:58
 * @decripton 除法
 */
public class OperationDiv extends AbstractOperation {
    @Override
    public Double getResult() throws Exception {
        if (super.getNumberB() == 0) {
            throw new Exception("除数不能为0");
        }
        return super.getNumberA() / super.getNumberB();
    }
}
